<template>
  <div class="banner">
    <!--轮播 -->
    <div class="am-slider am-slider-default scoll"
         data-am-flexslider
         id="demo-slider-0">
      <ul class="am-slides">
        <li v-for="(banner, index) in banners">
          <a :href="banner.url"><img :src="banner.img" /></a>
        </li>
      </ul>
    </div>
    <div class="clear"></div>
  </div>
</template>

<script>
// import $ from 'jquery'

export default {
  name: 'yy-home-banner',
  mounted () {
    // $('.am-slider').flexslider()
  },
  data () {
    return {
      banners: [
        { img: 'static/images/ad1.jpg', url: 'introduction.html' },
        { img: 'static/images/ad2.jpg', url: 'introduction.html' },
        { img: 'static/images/ad3.jpg', url: 'introduction.html' },
        { img: 'static/images/ad4.jpg', url: 'introduction.html' }
      ]
    }
  }
}
</script>
